<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>数据库审核系统</title>
    {% load staticfiles %}
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="icon" href="/media/img/favicon.ico">
    <link rel="stylesheet" href="{% static 'AdminLTE-2.4.5/bower_components/bootstrap/dist/css/bootstrap.min.css' %}">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="{% static 'AdminLTE-2.4.5/bower_components/font-awesome/css/font-awesome.min.css' %}">
    <!-- Ionicons -->
    <link rel="stylesheet" href="{% static 'AdminLTE-2.4.5/bower_components/Ionicons/css/ionicons.min.css' %}">
    <!-- Theme style -->
    <link rel="stylesheet" href="{% static 'AdminLTE-2.4.5/dist/css/AdminLTE.min.css' %}">
    <!-- AdminLTE Skins. We have chosen the skin-blue for this starter
          page. However, you can choose any other skin. Make sure you
          apply the skin class to the body tag so the changes take effect. -->
    <link rel="stylesheet" href="{% static 'AdminLTE-2.4.5/dist/css/skins/skin-blue.min.css' %}">
    <!-- animate -->
    <link rel="stylesheet" href="{% static 'animate.css' %}">
    <!-- pnotify -->
    <link rel="stylesheet" href="{% static 'AdminLTE-2.4.5/bower_components/pnotify/pnotify.custom.min.css' %}">
    <!-- bootstrap-select -->
    <link rel="stylesheet"
          href="{% static 'AdminLTE-2.4.5/bower_components/bootstrap-select/dist/css/bootstrap-select.min.css' %}">
    <!-- bootstrap-table -->
    <link rel="stylesheet"
          href="{% static 'AdminLTE-2.4.5/bower_components/bootstrap-table/bootstrap-table.css' %}">
    <link rel="stylesheet"
          href="{% static 'AdminLTE-2.4.5/bower_components/bootstrap-table/bootstrap-table-fixed-columns.css' %}">
    <link rel="stylesheet"
          href="{% static 'AdminLTE-2.4.5/bower_components/bootstrap3-editable/css/bootstrap-editable.css' %}">
    <!-- CodeMirror -->
    <link rel="stylesheet" href="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/lib/codemirror.css' %}">
    <link rel="stylesheet"
          href="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/hint/show-hint.css' %}">
    <link rel="stylesheet"
          href="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/fold/foldgutter.css' %}">
    <link rel="stylesheet"
          href="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/dialog/dialog.css' %}">
    <link rel="stylesheet"
          href="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/theme/material.css' %}">
    <link rel="stylesheet"
          href="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/theme/dracula.css' %}">
    <link rel="stylesheet"
          href="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/theme/monokai.css' %}">
    <!-- jstree -->
    <link rel="stylesheet"
          href="{% static 'AdminLTE-2.4.5/bower_components/jstree/dist/themes/default/style.min.css' %}">
    <!-- highlight -->
    <link rel="stylesheet"
          href="{% static 'AdminLTE-2.4.5/bower_components/highlight/github.min.css' %}">
    <!-- jquery loading -->
    <link rel="stylesheet" href="{% static 'AdminLTE-2.4.5/bower_components/jquery-loading/jquery.loading.min.css' %}">
    <!-- xterm -->
    <link rel="stylesheet" href="{% static 'AdminLTE-2.4.5/bower_components/xterm/css/xterm_3.5.1.css' %}">

    <style>
        .table > tbody > tr > td {
            vertical-align: middle !important;
        }

        .CodeMirror pre.CodeMirror-placeholder {
            color: #999;
        }
    </style>

    <!-- 定义 css block -->
    {% block link_css %}
    {% endblock %}

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->

    <!-- Google Font -->
    <link rel="stylesheet"
          href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <!-- Main Header -->
    <header class="main-header">
        <!-- Logo -->
        <a href="#" class="logo">
            <!-- mini logo for sidebar mini 50x50 pixels -->
            <span class="logo-mini"><b>A</b>LT</span>
            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg">数据库审核系统</span>
        </a>

        <!-- Header Navbar -->
        <nav class="navbar navbar-static-top" role="navigation">
            <!-- Sidebar toggle button-->
            <!-- Navbar Right Menu -->
            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <!-- User Account Menu -->
                    <li class="dropdown user user-menu">
                        <!-- Menu Toggle Button -->
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <!-- The user image in the navbar-->
                            <img src="/media/{{ request.user.avatar_file }}" class="user-image" alt="User Image">
                            <!-- hidden-xs hides the username on small devices so only the image appears. -->
                            <span class="hidden-xs">{{ request.user.displayname }}</span>
                        </a>
                        <ul class="dropdown-menu">
                            <!-- The user image in the menu -->
                            <li class="user-header" style="background-color: #e1e6e4">
                                <img src="/media/{{ request.user.avatar_file }}" class="img-circle" alt="User Image">
                                <p>
                                    {{ request.user.displayname }}
                                    <small>{{ request.user.user_role }}</small>
                                </p>
                            </li>
                            <!-- Menu Footer-->
                            <li class="user-footer">
                                <div class="pull-left">
                                    <a href="{% url 'p_user_profile' %}" class="btn btn-default btn-flat">个人信息</a>
                                </div>
                                <div class="pull-right">
                                    <a href="{% url 'p_logout' %}" class="btn btn-default btn-flat">退出</a>
                                </div>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
        </nav>
    </header>
    <!-- Left side column. contains the logo and sidebar -->
    <aside class="main-sidebar">

        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">

            <!-- Sidebar user panel (optional) -->
            <div class="user-panel">
                <div class="pull-left image">
                    <img src="/media/{{ request.user.avatar_file }}" class="img-circle" alt="User Image">
                </div>
                <div class="pull-left info">
                    <p>{{ request.user.username }}</p>
                    <a href="#">{% if request.user.user_role %}{{ request.user.user_role }}{% endif %}</a>
                </div>
            </div>

            <!-- Sidebar Menu -->
            <ul class="sidebar-menu" data-widget="tree">
                <li class="header">导航栏</li>
                <!-- Optionally, you can add icons to the links -->
                <li class="treeview">
                    <a>
                        <i class="fa fa-history"></i>
                        <span>历史工单</span>
                        <span class="pull-right-container">
                                    <i class="fa fa-angle-left pull-right"></i>
                                </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href='{% url 'p_render_my_orders' %}'><i
                                class="fa fa-circle-o"></i>我的工单</a>
                            {% for i in order_environment %}
                                <li><a href='/sqlorders/sql_orders_list/{{ i.envi_id }}/'><i
                                    class="fa fa-circle-o"></i>审核_{{ i.envi_name }}</a>
                            {% endfor %}
                    </ul>
                </li>

                <li class="treeview">
                    <a>
                        <i class="fa fa-edit"></i>
                        <span>新建工单</span>
                        <span class="pull-right-container">
                                    <i class="fa fa-angle-left pull-right"></i>
                                </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="{% url 'p_render_get_sql_tasks_version' %}"><i class="fa fa-circle-o"></i>上线版本号</a>
                        </li>
                        <li><a href="{% url 'p_render_sql_dml_orders' %}"><i
                                class="fa fa-circle-o"></i>DML工单</a>
                        </li>
                        <li><a href="{% url 'p_render_sql_ddl_orders' %}"><i
                                class="fa fa-circle-o"></i>DDL工单</a>
                        </li>
                    </ul>
                </li>

                <li class="treeview">
                    <a>
                        <i class="fa fa-history"></i>
                        <span>数据查询</span>
                        <span class="pull-right-container">
                                    <i class="fa fa-angle-left pull-right"></i>
                                </span>
                    </a>
                    <ul class="treeview-menu">
                        {% for i in order_environment %}
                            <li><a href='/sqlquery/sql_query/{{ i.envi_id }}/'><i
                                class="fa fa-circle-o"></i>查询_{{ i.envi_name }}</a>
                        {% endfor %}
                    </ul>
                </li>

                <li class="treeview">
                    <a>
                        <i class="fa fa-history"></i>
                        <span>Xterm</span>
                        <span class="pull-right-container">
                                    <i class="fa fa-angle-left pull-right"></i>
                                </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="{% url 'p_web_ssh' %}"><i class="fa fa-circle-o"></i>webshell</a></li>
                    </ul>
                </li>
            </ul>
            <!-- /.sidebar-menu -->
        </section>
        <!-- /.sidebar -->
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Main content -->
        <section class="content container-fluid">
            {% block right_content %}
            {% endblock %}
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->

    <!-- Main Footer -->
    <footer class="main-footer">
        <!-- To the right -->
        <div class="pull-right hidden-xs">
            Anything you want
        </div>
        <!-- Default to the left -->
        <strong>Copyright &copy; 2016 <a href="#">Company</a>.</strong> All rights reserved.
    </footer>

    <!-- Add the sidebar's background. This div must be placed
    immediately after the control sidebar -->
    <div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->

<!-- REQUIRED JS SCRIPTS -->

<!-- jQuery 3 -->
<script src="{% static 'AdminLTE-2.4.5/bower_components/jquery/dist/jquery.min.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/jquery-ui/jquery-ui.min.js' %}"></script>
<script>
    $.widget.bridge('uibutton', $.ui.button);

    /** add active class and stay opened when selected */
    let url = window.location;

    // for sidebar menu entirely but not cover treeview
    $('ul.sidebar-menu a').filter(function () {
        return this.href == url;
    }).parent().addClass('active');

    // for treeview
    $('ul.treeview-menu a').filter(function () {
        return this.href == url;
    }).parentsUntil(".sidebar-menu > .treeview-menu").addClass('active');
</script>
<!-- Bootstrap 3.3.7 -->
<script src="{% static 'AdminLTE-2.4.5/bower_components/bootstrap/dist/js/bootstrap.min.js' %}"></script>
<!-- AdminLTE App -->
<script src="{% static 'AdminLTE-2.4.5/dist/js/adminlte.min.js' %}"></script>
<!-- Slimscroll -->
<script src="{% static 'AdminLTE-2.4.5/bower_components/jquery-slimscroll/jquery.slimscroll.min.js' %}"></script>
<!-- FastClick -->
<script src="{% static 'AdminLTE-2.4.5/bower_components/fastclick/lib/fastclick.js' %}"></script>
<!-- jquery-form -->
<script src="{% static 'jquery.form.min.js' %}"></script>
<!-- jquery-cookie -->
<script src="{% static 'jquery.cookie.js' %}"></script>
<!-- CodeMirror -->
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/lib/codemirror.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/mode/clike/clike.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/mode/sql/sql.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/display/placeholder.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/display/autorefresh.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/hint/show-hint.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/hint/anyword-hint.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/hint/sql-hint.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/selection/active-line.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/search/searchcursor.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/search/search.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/dialog/dialog.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/edit/matchbrackets.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/edit/closebrackets.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/comment/comment.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/wrap/hardwrap.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/fold/foldcode.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/fold/brace-fold.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/keymap/sublime.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/scroll/annotatescrollbar.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/search/matchesonscrollbar.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/search/match-highlighter.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/codemirror-5.37.0/addon/mode/overlay.js' %}"></script>
<!-- pnotify -->
<script src="{% static 'AdminLTE-2.4.5/bower_components/pnotify/pnotify.custom.min.js' %}"></script>
<!-- bootstrap-select -->
<script src="{% static 'AdminLTE-2.4.5/bower_components/bootstrap-select/dist/js/bootstrap-select.min.js' %}"></script>
<!-- bootstrap-table -->
<script src="{% static 'AdminLTE-2.4.5/bower_components/bootstrap-table/bootstrap-table.min.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/bootstrap-table/bootstrap-table-fixed-columns.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/bootstrap-table/bootstrap-table-editable.min.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/bootstrap3-editable/js/bootstrap-editable.min.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/bootstrap-table/bootstrap-table-zh-CN.min.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.min.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/bootstrap-table/extensions/export/bootstrap-table-export.min.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/bootstrap-table/extensions/export/tableExport.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/bootstrap-table/extensions/editable/bootstrap-table-editable.min.js' %}"></script>
<!-- moment -->
<script src="{% static 'AdminLTE-2.4.5/bower_components/moment/moment.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/moment/locale/zh-cn.js' %}"></script>
<!-- bootstrap-validation -->
<script src="{% static 'AdminLTE-2.4.5/bower_components/bootstrap-validation/validator.min.js' %}"></script>
<!-- layer -->
<script src="{% static 'AdminLTE-2.4.5/bower_components/layer/layui.js' %}"></script>
<!-- jstree -->
<script src="{% static 'AdminLTE-2.4.5/bower_components/jstree/dist/jstree.min.js' %}"></script>
<!-- highlight -->
<script src="{% static 'AdminLTE-2.4.5/bower_components/highlight/highlight.min.js' %}"></script>
<script src="{% static 'AdminLTE-2.4.5/bower_components/highlight/sql.min.js' %}"></script>
<!-- jquery loading -->
<script src="{% static 'AdminLTE-2.4.5/bower_components/jquery-loading/jquery.loading.min.js' %}"></script>
<!-- xterm -->
<script src="{% static 'AdminLTE-2.4.5/bower_components/xterm/js/xterm_3.5.1.js' %}"></script>
<!-- public js file -->
<script src="{% static 'public.js' %}"></script>

<!-- 定义 javascript block -->
{% block link_javascripts %}
{% endblock %}

</body>
</html>